<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
// API 登录和退出
Route::get('server/patch/{id}', 'ApiController@server_patch');


Route::post('login', 'Auth\LoginController@api_login');
Route::post('logout', 'Auth\LoginController@api_logout');


Route::middleware('auth:api')->post('/user', function (Request $request) {
    return $request->user();
});

Route::any('/t', function (Request $request) {
    return 123;
});

Route::get('/authorize/xiaohuai', 'ApiController@authorize_xiaohuai');

Route::post('/getChars', 'ApiController@getChars');
Route::post('/gmCommand', 'ApiController@gmCommand');
Route::post('/gmCommand/sendItems', 'ApiController@gmCommand_sendItems');
Route::post('/gmCommand/sendMoney', 'ApiController@gmCommand_sendMoney');
Route::post('/gmCommand/toLevel', 'ApiController@gmCommand_toLevel');



Route::any('manager/info', 'Manager\AuthSingleController@info');

